package com.sondertara.joya.core.jdbc.support.dialect.pagination;

public class DerbyPaginationSupport implements PaginationSupport {


    @Override
    public PageDialect pagination(String sql, int page, int pageSize) {
        int offset = (page - 1) * pageSize;
        return new PageDialect(sql + " OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ", offset, pageSize);
    }
}
